import request from '@/router/axios';
/**
 *
 * 出维修确认页面接口大全
 */
// export const getList = (current, size, params) => {
//   return request({
//     url: '/api/mes-product/mro/centerproduct/page',
//     method: 'get',
//     params: {
//       ...params,
//       current,
//       size
//     }
//   });
// };
export const getList = (params) => {
  return request({
    url: '/api/mes-product/mro/centerproduct/list',
    method: 'get',
    params: {
      ...params,
    }
  });
};



export const getDetail = (id) => {
  return request({
    url: '/api/mes-product/mro/centerproduct/detail',
    method: 'get',
    params: {
      id
    }
  });
};

// 获取车间和产线列表
export const getWorkshopAndLine = () => {
  return request({
    url: '/api/mes-product/productionline/query-workshop-line-list',
    method: 'get',
    params: {}
  });
};

export const repairOut = (result, qualifiedRouteId, groupCodes, row) => {
  return request({
    url: `/api/mes-product//mro/centerproduct/repair-out?result=${result}&qualifiedRouteId=${qualifiedRouteId}&groupcodes=${groupCodes}`,
    method: 'post',
    data: row
  });
};

export const getAll = (params) => {
  return request({
    url: '/api/mes-product/mro/centerproduct/list',
    method: 'get',
    params: {
      ...params
    }
  });
};

export const getAllByQC = (params) => {
  return request({
    url: '/api/mes-product/mro/centerproduct/listByQC',
    method: 'get',
    params: {
      ...params,
    }
  });
};

export const getInspectionPack = (params) => {
  return request({
    url: '/api/mes-product/qms-inspection-object/list',
    method: 'get',
    params: {
      ...params,
    }
  });
};

export const markSpecial = (params) => {
  return request({
    url: '/api/mes-product/qms-inspection-object/update/special',
    method: 'get',
    params: {
      ...params,
    }
  });
};
